<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/sys/organ.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			var page = sys_fill_parm('queryOrganForm');
			editOrgan_organ();
		}
	});
});
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<div class="dataTables_title">
	<div class="dataTables_title_left">按钮注释</div>
	<div class="dataTables_title_right">
		<a class="btn btn-danger" href="#"><i class="icon-lock"></i> 屏蔽</a>
		<a class="btn btn-warning" href="#"><i class="icon-unlock"></i> 解除屏蔽</a>
		<a class="btn btn-success" href="#"><i class="icon-edit"></i> 编辑</a>
	</div>
</div>
<table class="table table-bordered">
		<tr><th>名称</th>
			<th>机构类型</th>
			<th>下级机构数量</th>
			<th>创建时间</th>
			<th>创建人</th>
			<th>是否屏蔽</th>
			<th>是否使用</th>
			<th style="width:60px;">操作</th></tr>
	<tbody>
		<#list pageBean.resultList as o>
		<tr><td>${o.name}</td>
			<td>${o.otn}</td>
			<td><a href="javascript:;" onclick="javascript: sys_load_handle('organ-tree_${o.code}'); return false;">${o.sonCount}</a></td>
			<td><#if (o.ct)??>${o.ct?string('yyyy-MM-dd HH:mm')}</#if></td>
			<td>${o.cun}</td>
			<td><@mt.YesOrNo value=((o.deleted)!"") r=false /></td>
			<td><@mt.YesOrNo value=((o.isUsing)!"") r=false /></td>
			<td>
				<div id="tttttt" class="btn-group">
					<#if !o.deleted>
					<a href="javascript:;" onclick="javascript: shieldOrgan_organ('${o.code}', '${o.name}');" data-toggle="tooltip" title="屏蔽" class="btn btn-xs btn-danger"><i class="icon-lock"></i></a>
					<#else>
					<a href="javascript:;" onclick="javascript: unshieldOrgan_organ('${o.code}', '${o.name}');" data-toggle="tooltip" title="解除屏蔽" class="btn btn-xs btn-warning"><i class="icon-unlock"></i></a>
					</#if>
					<a href="javascript:;" onclick="javascript: sys_load_handle('organ-edit_${o.code}');" data-toggle="tooltip" title="编辑" class="btn btn-xs btn-success"><i class="icon-edit"></i></a>
				</div>
			</td>
		</tr>
		</#list>
	</tbody>
</table>
<#import "/freemarker/pagination.ftl" as p><@p.pagination pageBean 'queryOrgan_organ' />

